package Hello_XML;




/**
 * @Grup:Hello
 * @Auther:cola
 * @Data:2021/4/17-2021-04-14:00
 * @version:1.0
 */
public class MessagePrinter {
    /*
    * 简历和MessageService的关联关系
    * */
    private MessageService service;

    public MessagePrinter() {
        super();
        System.out.println("Messageprinter....");
    }

    /*
     * 获取service的值
     * @param service
     * */
    public MessageService getService() {
        return service;
    }
    /*
     * 设置service的值
     * @param service
     * */
    public void setService(MessageService service) {
        this.service = service;
    }

    public void printMessage(){
        System.out.println(this.service.getMessage());
    }
}
